<script setup lang="ts">
import { RouterView, useRoute } from 'vue-router'
import AppNav from '@/components/AppNav.vue'
import { useUserStore } from '@/stores/auth/user'
import { storeToRefs } from 'pinia'

const route = useRoute()
const userStore = useUserStore()
const { user } = storeToRefs(userStore)

const hideNav = ['login','register']
</script>

<template>
  <div id="app">
    <AppNav v-if="!hideNav.includes(route.name as string)" />
    <RouterView />
  </div>
</template>

<style scoped>
#app {
  width: 100%;
  min-height: 100vh;
}
</style>
